home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 2730 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.9 KB

  1. Path: news.muc.de!hwg!heinz
  2. Subject: The NewObtainGIRPort myth
  3. Newsgroups: comp.sys.amiga.programmer
  4. Organization: Private
  5. X-Newsreader: TIN [AMIGA 1.3 950726BETA PL0]
  6. From: heinz@hwg.muc.de (Heinz Wrobel)
  7. Message-ID: <heinz.15xc@hwg.muc.de>
  8. Date: Sat, 3 Feb 96 22:30:19 GMT
  9.  
  10. For those of you who think they have to use something like
  11. the NewObtainGIRPort hack:
  12.  
  13. NewObtainGIRPort is
  14.  
  15.     a) useless, because it is not really fixing things.
  16.        At least the 1.1 code is buggy.
  17.  
  18.     b) the wrong approach, because the application having the
  19.        problem should be fixed. The OS is ok.
  20.  
  21. You are asking why I am saying that? Let me explain.
  22.  
  23. ObtainGIRPort() will also do a layer lock. This is unfortunately
  24. not mentioned in the autodocs. But it is described that you may not
  25. cache that RastPort:
  26.  
  27.     This function must be called EACH time a hook routine needing
  28.     to perform gadget rendering is called, and must be accompanied
  29.     by a corresponding call to ReleaseGIRPort().
  30.  
  31. This is obviously a strong indicator that you
  32.  
  33.     a) may only use simple rendering calls (That's what the
  34.         function is for: rendering)
  35.     b) may not give control back to Intuition either by leaving the
  36.        context or by calling Intuition functions before you called
  37.        ReleaseGIRPort().
  38.  
  39. Once you know that ObtainGIRPort() does a layer lock, you can look
  40. up the LockLayer() autodoc, too:
  41.  
  42.     Further Note: while you hold the lock on a layer, Intuition will block
  43.         on operations such as windowsizing, dragging, menus, and depth
  44.         arranging windows in this layer's screen.  It is recommended that
  45.         YOU do not make Intuition function calls while the layer is locked.
  46.  
  47. So everyone who is currently using a hack like NewObtainGIRPort
  48. should better complain to the authors of the application that
  49. causes the problems in the first place.
  50.  
  51. -- 
  52. Heinz Wrobel        Private Mail:   heinz@hwg.muc.de
  53. My private FAX: +49 89 850 51 25, I prefer email
  54.